package testJdk.io.reader;

import java.io.CharArrayReader;
import java.io.IOException;

/**
 * @Name : com.io.reader.CharArrayTester
 * @Description : 描述
 * Created by cyd on 2020-12-23 11:24:48
 */
public class CharArrayTester {
    public static void main(String[] args) throws IOException {
        char[] buff = {'a', '你', '好', '1'};
        CharArrayReader reader = new CharArrayReader(buff);
        int data;
        while ((data = reader.read()) != -1) {
            System.out.println((char) data);
        }
        reader.close();
    }
}
